package com.yehuishou.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yehuishou.dao.EvaluateDao;
import com.yehuishou.pojo.GuestBook;
import com.yehuishou.pojo.Itempl;
import com.yehuishou.service.EvaluateService;

@Service
public class EvaluateServiceImpl implements EvaluateService {
	@Resource
	private EvaluateDao evaluatedao;

	@Override
	public PageInfo<GuestBook> backEvaluate(Integer pageNum, Integer pageSize, GuestBook gb) {
		// TODO Auto-generated method stub
		PageHelper.startPage(pageNum, pageSize);
		List<GuestBook> list=evaluatedao.backEvaluate(gb);
		PageInfo<GuestBook> pageinfo=new PageInfo<GuestBook>(list);
		return pageinfo;
	}

	@Override
	public int backEvaluateDel(Integer id) {
		// TODO Auto-generated method stub
		int i = evaluatedao.backEvaluateDel(id);
		return i;
	}

	@Override
	public List<Itempl> itemEvaluate(Itempl ipl) {
		// TODO Auto-generated method stub
		return evaluatedao.itemEvaluate(ipl);
	}

	@Override
	public int itemEvaluateDel(Integer id) {
		// TODO Auto-generated method stub
		return evaluatedao.itemEvaluateDel(id);
	}
}
